package fr.lelouet.monitoring;

import java.util.List;

import fr.lelouet.tools.Configurable;

/** a prober to get values once configured */
public interface UsageMonitor extends Configurable {

	/**
	 * set the list of {@link DataHandler} to use when a new data happens
	 */
	public void setHandlers(List<DataHandler> handlers);

	/**
	 * request to get the data and put it in the {@link DataHandler}s specified
	 * by {@link #setHandlers(List)}
	 */
	public void gatherInformations();

	/**
	 * @return true when previously started call to
	 *         {@link #gatherInformations()} has ended
	 */
	public boolean informationGathered();

	/**
	 * request to stop any gathering information. eg, if resource monitored does
	 * not exist anymore.<br />
	 * An interrupted UsageMonitor still has its {@link #informationGathered()}
	 * to true
	 */
	public void interrupt();

}
